////////////////////////////////////////////////////////////////////////////////
//                                                                            //
//  Filename:     SuperDiamondMineGuts.h                                      //
//  Developer:    George Chapman                                              //
//  Create date:  7/20/2003                                                   //
//                                                                            //
////////////////////////////////////////////////////////////////////////////////
//                                                                            //
//  Description:  This is the class definition for the Super Diamond Mine     //
//                guts.                                                       //
//                                                                            //
////////////////////////////////////////////////////////////////////////////////
//        Copyright (c) 2003 - Realtime Gaming.  All rights reserved.         //
////////////////////////////////////////////////////////////////////////////////

#pragma once
#ifndef SUPDMINE_H
#define SUPDMINE_H

#include "slotguts.h"

class SuperDiamondMineGuts : public SlotGuts
{

	public:

        SuperDiamondMineGuts();
        virtual ~SuperDiamondMineGuts();

        // Overrides of virtual methods from SlotGuts
		virtual void  playBonusGame(uint8 bonusGameType, int32 bonusDataCount, int32 *bonusData);
	    virtual void  classifyScatters(SlotSpin *spin);
		virtual bool8 isGameComplete();
		virtual bool8 load(Info *info);
		virtual bool8 saveGame();
        virtual bool8 hasSavedGames(){return true;};

	protected:
        
        // Overrides of virtual methods from SlotGuts
        virtual void  preSpinClassifyResults(SlotSpin*);
        virtual void  postSpinClassifyResults(SlotSpin*);
		virtual uint8 classifyStops(uint8 *, uint8, uint8);
        virtual bool8 isValidGuts();

		#ifdef DEBUGSPIN
		virtual void Debug_SetLoserStops( uint8* pStops );
		#endif

        // Helper functions 
        uint8         addDiamondToIcon(uint8 icon, uint8 diamondIcon);
        bool8         iconHasDiamond(uint8) const;
        uint8         getIconCategory(uint8) const;
		void          initializeDiamondMineBonusGame();
        void          clearWheelHouse( SlotWheelHouse* pWheelHouse );
        void          copyWheelHouse( SlotWheelHouse* pSourceWheelHouse, SlotWheelHouse* pTargetWheelHouse );

        // Protected member data       
		bool8           m_bReadyToFinish;
		int32           m_nTotalBet;
        SlotWheelHouse  m_OriginalWheelHouseCopy;

        // static member data
        static const uint8  m_nMaxDiamondMines;
        static const uint32 m_nNumBigBonusPayouts;
        static const uint32 m_nNumBigBonusNumGoodPicksWeights;

        enum SUBGAMEDEFS
        {   SGNOTPICKEDLOSER  = -5, 
			SGNOTPICKEDWINNER = -4,
            SGPICKEDLOSER     = -3,
            SGPICKEDWINNER    = -2,
			SGNOTPICKED       = -1,
			BGNONE            = 0,
			BGCASCADE         = 1,
			BGDIAMONDMINE     = 2,
            BGBOTH            = 3
        };
        
        // Enumerations for subgame data variables.
        // Subgame data is maintained as a matched
        // pair of an enum and a value.  
        enum SUBGAMEIDX
        {
            // Client and Server data
			SGIDX_SDM_BONUSGAME,
            SGIDX_SDM_DIAMOND_COUNTER,
            SGIDX_SDM_LAST_MINE_SELECTED,
            SGIDX_SDM_ISDONE,
            SGIDX_SDM_PICK_ONE,
            SGIDX_SDM_VALUE_ONE,
            SGIDX_SDM_PICK_TWO,
            SGIDX_SDM_VALUE_TWO,
            SGIDX_SDM_PICK_THREE,
            SGIDX_SDM_VALUE_THREE,
			SGIDX_SDM_PICK_FOUR,
			SGIDX_SDM_VALUE_FOUR,
			SGIDX_SDM_PICK_FIVE,
			SGIDX_SDM_VALUE_FIVE,
			SGIDX_SDM_PICK_SIX,
			SGIDX_SDM_VALUE_SIX,
			SGIDX_SDM_PICK_SEVEN,
			SGIDX_SDM_VALUE_SEVEN,

            // Server Only Data
            SGIDX_SDM_RUNNING_BET_TOTAL,
            SGIDX_SDM_RUNNING_BET_COUNT,
			SGIDX_SDM_NUMGOODPICKS,
			SGIDX_SDM_MINES_PICKED,

            SG_SZ

        };

    private:

    // Typedef for easy reference to the base class.
    typedef SlotGuts BASE;

};
#endif


